#include "Exam.h"

Exam::Exam()
{
}

Exam::Exam(int number, QDate date)
{
    this->number = number;
    this->date = date;
}

int Exam::getNumber() const
{
    return this->number;
}

QDate Exam::getDate()const
{
    return this->date;
}

void Exam::setNumber(int number)
{
    this->number = number;
}

void Exam::setDate(QDate date)
{
    this->date = date;
}

QDataStream &operator<<(QDataStream &out, const Exam &data)
{
   out << quint32(data.getNumber()) << data.getDate();
   return out;
}

QDataStream &operator>>(QDataStream &in, Exam &data)
{
    quint32 number;
    QDate date;
    in >> number >> date;
    data = Exam(number, date);
    return in;
}
